package sb.mybatisp.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)//false比较继承的父类的属性
@TableName(value = "user"/*, excludeProperty = {"age"}*/)//excludeProperty需排除的属性名
public class User {
    private static final long serialVersionUID = 1L;//序列化

    @TableId(value = "id", type = IdType.AUTO)//主键注解
    private Long id;
    private String name;
    private Integer age;
    private String email;
    private int deleted;

    @TableField(value = "email")//字段注解
    private String EMAIL;
}
